using System.Text.Json.Serialization;

namespace Sage.CloudStorage.Qiniu.Models
{
    /// <summary>
    /// 持久化数据处理结果
    /// </summary>
    public class PfopResult
    {
        /// <summary>
        /// 状态码，0表示成功
        /// </summary>
        [JsonPropertyName("code")]
        public int Code { get; set; }

        /// <summary>
        /// 持久化处理ID，用于查询处理状态
        /// </summary>
        [JsonPropertyName("persistentId")]
        public string PersistentId { get; set; } = string.Empty;

        /// <summary>
        /// 错误信息，仅当处理失败时有值
        /// </summary>
        [JsonPropertyName("error")]
        public string? Error { get; set; }
    }
}